﻿<UserControl x:Class="PowerWPF.MyTool"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="400"  >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        
        <TextBlock Text="Type PowerShell Code:" FontWeight="Bold" HorizontalAlignment="Center" Margin="5" />
        
        <TextBox x:Name="InputBox" Grid.Row="1" AcceptsReturn="True" Margin="5" FontFamily="Lucida Console" FontSize="12" />        
        
        <Button Content="Execute" Margin="5" Click="DirectCodeButton_Click"  Width="100" Grid.Row="2" />
        
        <TextBlock Grid.Column="1" Text="Script file with parameter:" FontWeight="Bold" Margin="5" HorizontalAlignment="Center" />
        
        <ListBox x:Name="ParametersListbox" Grid.Row="1" Grid.Column="1">
            <ListBoxItem Content="MyChoice1" IsSelected="True" />
            <ListBoxItem Content="MyChoice2" />
            <ListBoxItem Content="MyChoice3" />
            <ListBoxItem Content="MyChoice4" />
        </ListBox>
        
        <Button x:Name="TextFileButton" Content="Execute From Script File" Grid.Row="2" Grid.Column="1" Width="150" Margin="5" Click="TextFileButton_Click" />        
        
        <TextBox x:Name="OutputBox" AcceptsReturn="True" Grid.Row="3" Grid.ColumnSpan="2" Margin="5" VerticalScrollBarVisibility="Auto" 
                 HorizontalScrollBarVisibility="Auto" FontFamily="Lucida Console" Background="#FF012456" Foreground="White" FontSize="12" Height="300"  />
    </Grid>
</UserControl>
